//File name:routes.go
//Description:路由器
package main

import (
	"3jc.com/gin-vue-admin/controller"
	"3jc.com/gin-vue-admin/middleware"
	"github.com/gin-gonic/gin"
)

func CollectRoute(r *gin.Engine) *gin.Engine {
	//注册
	r.POST("/api/auth/register", controller.Register)

	//登录
	r.POST("/api/auth/login", controller.Login)

	//用户信息查询
	r.GET("/api/auth/info", middleware.AuthMiddleware(), controller.Info)

	return r
}
